Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@untool/yargs
Advanced tools
@untool/yargs
@untool/yargs
is a core mixin providing untool
's actual command line interface, allowing other mixins to define their own commands. These custom commands will work exactly as those defined by untool
's own modules and can be called using a local or global un
executable.
$ yarn add @untool/yargs # OR npm install @untool/yargs
@untool/yargs
can either be used with untool
's global command line interface or directly, within package.json
scripts of the project it is installed in: it locally installs an un
command.
$ un
Usage: un <command> [options]
Commands:
un serve Serve foo
un start Build and serve foo
un build Build foo
un develop Serve foo in watch mode
Options:
--version Show version number [boolean]
--help, -h Show help [boolean]
$ un start
foo info
server listening at http://localhost:8080
@untool/yargs
does not define any commands of its own, but takes care of basically setting up yargs
and logging to stdout
and stderr
. You can call un
with an optional -l
or --log
command line argument with one of the following values to control its output: debug
, info
, warn
, error
, silent
@untool/yargs
exposes a couple of mixin hooks other mixins can implement, allowing them to alter or extend its functionality. These hooks will be called either by @untool/yargs
itself or by others.
registerCommands(yargs)
(pipe)This is the most relevant hook provided by @untool/yargs
: it enables other mixins to register their respective commands. Implementations of this mixin method will receive two arguments: a yargs
instance and the command line arguments @untool/yargs
received. Implementations need to return the yargs
instance that they were called with.
const { Mixin } = require('@untool/core');
module.exports = class FooMixin extends Mixin {
registerCommands(yargs) {
return yargs.command({
command: 'foo',
handler: (argv) => {},
});
}
};
FAQs
untool yargs mixin
The npm package @untool/yargs receives a total of 167 weekly downloads. As such, @untool/yargs popularity was classified as not popular.
We found that @untool/yargs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.